package com.example.javabasic.thread.classtwo.singleton.demo4;

import java.util.Arrays;

public class Test {
    public static void main(String[] args) {
        ThreadLifeStyleListener threadLifeStyleListener = new ThreadLifeStyleListener();
        threadLifeStyleListener.concurrentQuery(()->{
            try {
                Thread.sleep(1000);
                System.out.println("线程等了一秒咯");
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        });
        threadLifeStyleListener.concurrentQuery(()->{
            try {
                Thread.sleep(1000);
                System.out.println("线程等了一秒咯");
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        });
        threadLifeStyleListener.concurrentQuery(()->{
            try {
                Thread.sleep(1000);
                System.out.println("线程等了一秒咯");
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        });
    }
}
